
FROM openjdk:8

ARG test_arg="default_arg"

ENV WORK_PATH=/home/jpom-test/

ENV RUN_LOG=/home/jpom-test-log/

ENV BUILD_ARG=$test_arg

ENV JAR_NAME=springboot-test-jar-0.0.1-SNAPSHOT.jar

ENV CODE_DIR=${WORK_PATH}

WORKDIR ${WORK_PATH}

#ADD  ./target/ .

ADD ./target ${WORK_PATH}

ADD ./script/run.sh ${WORK_PATH}/run.sh

EXPOSE 8084 8888

#ENTRYPOINT [ "java","-Djava.security.egd=file:/dev/./urandom", "-jar","/${jarName}"]
ENTRYPOINT ["/bin/bash", "/home/jpom-test/run.sh"]


